package com.ztranscript.service;

import com.spring.BeanNameAware;
import com.spring.Component;
import com.spring.InitializingBean;

/**
 * @author ztranscript 2021/9/18 13:48
 **/
@Component("world")
public class OrderService implements BeanNameAware, InitializingBean {
    private String beanName;

    public void order() {
//        System.out.println(beanName);
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化...");
    }
}
